﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>

<script type="text/javascript">
    function checkData() {
        var q = document.getElementById("q").value.trim();//trim去除前后空格
        if (q == null || q == "") {
            alert("请输入您要查询的关键字！");
            return false;
        } else {
            return true;
        }
    }

    function colorUpdate() {
        var options = $("#basic option:selected");
        var color;
        //alert(options.val()); //拿到选中项的文本
        if (options.val() == "aa") {
            // color="#f5f6f7";
            color = "#E1FFFF";
        }
        if (options.val() == "a") {
            color = "#FFE4E1";
        } else if (options.val() == "b") {
            color = "#FAF0E6";
        } else if (options.val() == "c") {
            color = "#FFFAF0";
        } else if (options.val() == "d") {
            color = "#F8F8FF";
        } else if (options.val() == "e") {
            color = "#FAFAD2";
        } else if (options.val() == "f") {
            color = "#F0FFF0";
        } else if (options.val() == "g") {
            color = "#2d2a2a";
        }
        $.ajax({
            url: "${pageContext.request.contextPath}/blogger/color.do",
            type: "POST",
            data: {"color": color},
            dataType: "text",
            success: function (data) {
                $("body").css("background-color", data);
            }
        });

    }
</script>
<div class="row">
    <div class="col-md-12" style="padding-top: 10px">
        <nav class="navbar navbar-default">
            <div class="container-fluid">
                <!-- Brand and toggle get grouped for better mobile display -->
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                            data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="${pageContext.request.contextPath}/index.html"><font
                            color="black"><strong>首页</strong></font></a>
                </div>

                <!-- Collect the nav links, forms, and other content for toggling -->
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                    <ul class="nav navbar-nav">
                        <!-- <li><a href="${pageContext.request.contextPath}/timeAxis.html"><font color="black"><strong>时光轴</strong></font></a></li>-->
                        <li>
                            <a href="${pageContext.request.contextPath}/blog/vip.html" target="view_window"><font color="red"><strong>VIP视频解析</strong></font></a>
                        </li>
                        <li>
                            <a href="https://huashuimoyu.com/" target="view_window"><font color="red"><strong>热点</strong></font></a>
                            <%--<a href="http://imgcache.qq.com/qqshow_v3/htdocs/my/inc/info.html" target="view_window"><strong>QQ注册日期查询</strong></a>--%>
                        </li>
                        <li>
                            <a href="http://music.junyuewl.com/?tdsourcetag=s_pcqq_aiomsg" target="_blank"><font color="red"><strong>MUSIC</strong></font></a>
                        </li>
                        <li>
                            <a href="${pageContext.request.contextPath}/blogger/aboutMe.html"><font color="black"><strong>关于</strong></font></a>
                        </li>
                        <li>
                            <a href="${pageContext.request.contextPath}/download.html"><font color="black"><strong>App/Java</strong></font></a>
                        </li>
                        <li style="margin-top:10px;margin-left:10px;margin-right:15px;">
                            <select id="basic" style="width:75px" class="selectpicker show-tick form-control"
                                    data-live-search="true" onchange="colorUpdate();">
                                <option id="aa" value="aa">天空青</option>
                                <option data-subtext="option subtext" id="a" value="a">薄雾玫瑰</option>
                                <option data-subtext="option subtext" id="b" value="b">亚麻布</option>
                                <option data-subtext="option subtext" id="c" value="c">花白色</option>
                                <option data-subtext="option subtext" id="d" value="d">幽灵白</option>
                                <option data-subtext="option subtext" id="e" value="e">浅秋麒麟黄</option>
                                <option data-subtext="option subtext" id="f" value="f">蜂蜜色</option>
                                <option data-subtext="option subtext" id="g" value="g">星空黑</option>
                            </select>
                        </li>
                    </ul>
                    <form class="navbar-form navbar-right" role="search"
                          action="${pageContext.request.contextPath}/blog/q.html" method="post"
                          onsubmit="return checkData()">
                        <div class="form-group">
                            <input type="text" name="q" id="q" class="form-control" placeholder="请输入要查询的关键字...">
                        </div>
                        <button type="submit" class="btn btn-default">搜索</button>
                    </form>
                </div><!-- /.navbar-collapse -->
            </div><!-- /.container-fluid -->
        </nav>
    </div>
</div>